package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.BiddingDemandSelection;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BiddingDemandSelectionMapper {
    int deleteByPrimaryKey(@Param("biddingSelectionId") Long biddingSelectionId, @Param("biddingDemandId") Long biddingDemandId);

    int insert(BiddingDemandSelection record);

    int insertSelective(BiddingDemandSelection record);

    BiddingDemandSelection selectByPrimaryKey(@Param("biddingSelectionId") Long biddingSelectionId, @Param("biddingDemandId") Long biddingDemandId);

    int updateByPrimaryKeySelective(BiddingDemandSelection record);

    int updateByPrimaryKey(BiddingDemandSelection record);

    /**
     * @param biddingDemandSelection 投标实体类
     * @return 返回查询到的结果
     * @Deprecated 查询某个招标中的所有投标人信息
     */
    List<BiddingDemandSelection> selectAllDemandSelectionList(BiddingDemandSelection biddingDemandSelection);

    /**
     * @param biddingDemandId 招标任务id
     * @param userId          用户id
     * @return 返回查询的条数
     * @Deprecated 查询是否重复投标
     */
    int selectIsRepeat(@Param("biddingDemandId") Long biddingDemandId, @Param("userId") Long userId);

    /**
     * @Deprecated 查询这个任务是否有人投递
     * @param biddingDemandId 招标任务id
     * @return 查询有几个人
     */
    int selectTotalCount(Long biddingDemandId);

    /**
     * @Deprecated 根据招标任务id
     * @param biddingDemandId 招标任务id
     */
    void deleteByDemandId(Long biddingDemandId);

    /**
     * @Deprecated 根据用户id删除选标信息
     * @param userId 用户id
     */
    void deleteByUserId(Long userId);
}